Changes babl_model_new() to create a respective double format
for every new registered model.
That way applications and extensions can rely on the double
format to always exist.
#include "babl-internal.h"
#include "babl-db.h"
+static Babl *construct_double_format (Babl *model);
+
static int
babl_model_destroy (void *data)
{
{
babl = model_new (name, id, components, component);
babl_db_insert (db, babl);
+ construct_double_format (babl);
}
else
{
int i;
argument[args++] = model;
- argument[args++] = babl_type ("double");
+ argument[args++] = babl_type_from_id (BABL_DOUBLE);
for (i = 0; i < model->model.components; i++)
{